// Copyright 2017 guangbo. All rights reserved.
package main

import (
	"flag"
	"gitee.com/goxiang2/server/lib/lib_util"
	"gitee.com/goxiang2/server/lib/lib_watch"
)

var port = flag.String("p", "19876", "master port")

func main() {
	flag.Parse()

	if *port == "" {
		flag.Usage()
		return
	}

	lib_util.InitDb("master.db")

	server := lib_watch.NewWatchServer()
	server.Start(":" + *port)
}
